<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="pageContent">
    <form method="post" action="manager/update" class="pageForm required-validate" onsubmit="return iframeCallback(this, navTabAjaxDone);" enctype="multipart/form-data">
        <input type="hidden" id="caseId" name="caseId" value="${thiCase.caseId}">
        <div class="pageFormContent">
            <p>
                <label>公司名称:</label>
                <input name="caseCompany" value="${thiCase.caseCompany}" class="required" type="text" size="30" placeholder="请输入公司名称" />
            </p>
            <p>
                <label>装饰描述:</label>
                <input name="caseDesc" value="${thiCase.caseDesc}" class="required" type="text" size="30" placeholder="请输入装饰描述"/>
            </p>
        </div>
        <label>装修类型:</label></br>
        <c:forEach items="${bigTypeList}" var="typeList">
            &nbsp;&nbsp;${typeList.caseBigType}:
            <c:forEach items="${caseLableList}" var="lableList">
                <c:if test="${typeList.bigTypeId == lableList.bigTypeId}">
                    <input type="checkbox" name="lableId" value="${lableList.lableId}">&nbsp;${lableList.caseLable}
                </c:if>
            </c:forEach></br></br>
        </c:forEach>
        <p>
            <label>装修案例总数:</label>
            <input name="showNum" value="${thiShow.showNum}" class="required" type="text" size="30" placeholder="请输入真实专修案例" />
        </p>
        <p>
            <label>装修产品区域:</label>
            <input name="serverArea" value="${thiShow.serverArea}" class="required" type="text" size="30" placeholder="请输入公司名称" />
        </p>
        <p>
            <label>装修产品描述:</label>
            <%--<input name="showComment" class="required" type="text" size="30" placeholder="请输入产品简要描述" />--%>
            <textarea name="showComment" class="required" style="width:600px;height: 160px;">${thiShow.showComment}</textarea>
        </p>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>
</div>

<script>

    $(function(){
        var ids = ${caseLableArrayList};
        //选中每个value与数组中value相同的checkbox
        $.each(ids, function(i,item){
            $("input[name=lableId][value="+item+"]").attr("checked","checked");
        });
    });

</script>

